{template 'common/header'}
<ul class="nav nav-tabs">
    <li><a href="{php echo $this->createWebUrl('cost', array('op' => 'list'))}">费用列表</a></li>
    <li class="active"><a href="{php echo $this->createWebUrl('cost', array('op' => 'edit'))}">编辑用户</a></li>
</ul>
<div class="panel panel-default">
  <div class="panel-heading">编辑用户</div>
  <div class="panel-body">
    <form class="form-horizontal" action="" method="post" enctype="multipart/form-data" onsubmit="return check(this);">
    <input type='hidden' name='id' class="form-control" value="{$item['id']}" />
      <div class="form-group">
          <label for="username" class="col-sm-2 control-label">姓名</label>
          <div class="col-xs-4">
            <input type='text' name='username' id='username' class="form-control" value="{$item['username']}" placeholder="请输入姓名"/>
          </div>
      </div>
      <div class="form-group">
          <label for="mobile" class="col-sm-2 control-label">手机号码</label>
          <div class="col-xs-4">
            <input type='text' name='mobile' id='mobile' class="form-control" value="{$item['mobile']}" placeholder="请输入手机号码"/>
          </div>
      </div>
      <div class="form-group">
          <label for="homenumber" class="col-sm-2 control-label">房号</label>
          <div class="col-xs-4">
            <input type='text' name='homenumber' id='homenumber' class="form-control" value="{$item['homenumber']}" placeholder="请输入房号"/>
          </div>
      </div>
      <div class="form-group">
          <label for="costtime" class="col-sm-2 control-label">时间</label>
          <div class="col-xs-4">
            <input type='text' name='costtime' id='costtime' class="form-control" value="{$item['costtime']}" placeholder="例如：2016年1月1日-2016年3月30日"/>
          </div>
      </div>
      <div class="form-group">
          <label for="propertyfee" class="col-sm-2 control-label">物业费</label>
          <div class="col-xs-4">
            <input type='text' name='propertyfee' id='propertyfee' class="form-control" value="{$item['propertyfee']}" placeholder="请输入物业费"/>
          </div>
      </div>
      <div class="form-group">
          <label for="otherfee" class="col-sm-2 control-label">其他费用</label>
          <div class="col-xs-4">
            <input type='text' name='otherfee' id='otherfee' class="form-control" value="{$item['otherfee']}" placeholder="请输入其他费用"/>
          </div>
      </div>
      <div class="form-group">
          <label for="total" class="col-sm-2 control-label">总计费用</label>
          <div class="col-xs-4">
            <input type='text' name='total' id='total' class="form-control" value="{$item['total']}" placeholder="请输入总计费用"/>
          </div>
      </div>
      <div class="form-group">
            <label for="" class="col-sm-2 control-label"></label>
            <div class="col-sm-10">
               <button type="submit" class="btn btn-primary span3" name="submit" value="提交">提交</button>
                <input type="hidden" name="token" value="{$_W['token']}" />
            </div>
      </div>
    </form>
  </div>
</div>
<script type="text/javascript">
  function check(form){
            if (!form['username'].value) {
                alert('请输入名字.');
                return false;
            }
            if (!form['mobile'].value) {
                alert('请输入手机号码');
                return false;
            }
            if (!form['homenumber'].value) {
                alert('请输入房号');
                return false;
            }
            if (!form['costtime'].value) {
                alert('请输入时间');
                return false;
            }
            if (!form['propertyfee'].value) {
                alert('请输入物业费');
                return false;
            }
            if (!form['otherfee'].value) {
                alert('请输入其他费用');
                return false;
            }
            if (!form['total'].value) {
                alert('请输入总计费用');
                return false;
            }
            return true;
        }
</script>


{template 'common/footer'}